import { createMemoryHistory, createRouter } from 'vue-router'
//引入组件
import Home from '../views/Home/index.vue'
import Login from '../views/Login/index.vue'
//配置路由规则
const routes = [
  { path: '/login', component: Login },
  { path: '/home', component: Home }
]
//创建路由对象
const router = createRouter({
  history: createMemoryHistory(),
  routes
})
export default router
